package com.doit.day04

object Map案例 {
  def main(args: Array[String]): Unit = {
    val map: Map[Int, String] = Map((1, "zss"), (2, "lss"), (3, "ww"))
/*    val maybeString: Option[String] = map.get(1)
    if (!maybeString.isEmpty){
      val value: String = maybeString.get
    }*/

    val str: String = map.getOrElse(1, "找不着")
    println(str)
    val str1: String = map.getOrElse(4, "找不着")
    println(str1)





  }

}
